﻿<%@ Page Title="Admin Opret Nyhed" Language="C#" MasterPageFile="~/Site.Master" AutoEventWireup="true" CodeBehind="adminNewsCreate.aspx.cs" Inherits="UCNKompetenceBors.Admin.adminCreateNews" %>

<%@ Register Assembly="CKEditor.NET" Namespace="CKEditor.NET" TagPrefix="CKEditor" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">

    <div id="adminWrapper" class="contentSmallWrapper floatLeft">
        <div id="adminSubMenuBox" class="submenuBox floatLeft">
            <div class="subMenuBoxContent">
                <ul>
                    <li>
                        <asp:HyperLink ID="hyLinkAdminDashboard" runat="server" Text="Admin Dashboard"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkUserHandling" runat="server" Text="Brugerhåndtering"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkAdminExchange" runat="server" Text="Køb og Salg"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkNewsHandling" runat="server" Text="Nyhedshåndtering"></asp:HyperLink>
                        <ul>
                            <li>
                                <asp:HyperLink ID="hyLinkAdminCreateNews" runat="server" Text="Opret Nyhed" ForeColor="#FF9933"></asp:HyperLink></li>
                        </ul>
                    </li>
                    <li>
                        <asp:HyperLink ID="hyLinkEditInformation" runat="server" Text="Ret Information"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkContactPerson" runat="server" Text="kontaktpersoner"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hylinkDepartment" runat="server" Text="Afdelinger"></asp:HyperLink></li>
                    <li>
                        <asp:HyperLink ID="hyLinkResetUsers" runat="server" Text="Reset Brugere"></asp:HyperLink></li>
                </ul>
            </div>
        </div>

        <div id="adminContentBox" class="contentBoxSmall floatLeft">
            <div id="adminContentBoxContent" class="floatLeft">
                <div class="inputFormSmall floatLeft">
                    <asp:Panel ID="panAdminCreateNews" runat="server">
                        <div class="inputFormSmallLeft floatLeft">
                            <div class="inputFormSmallRow floatLeft">
                                <asp:Label ID="lblAdminContentHeader" runat="server" Text="Opret nyhed" CssClass="contentTitle"></asp:Label>
                            </div>
                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblCreateNewsTitle" runat="server" Text="Titel:"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatRight">
                                    <asp:TextBox ID="txtCreateNewsTitle" runat="server" Width="300px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalTitle" runat="server" ErrorMessage="Title is required" ToolTip="Title is required" Text="*" ControlToValidate="txtCreateNewsTitle" ValidationGroup="AdminCreateNews" ForeColor="Red"></asp:RequiredFieldValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="floatLeft">
                                    <asp:Label ID="lblCreateNewsText" runat="server" Text="Tekst:"></asp:Label>
                                    <br />
                                    <br />
                                    <CKEditor:CKEditorControl ID="ckeditorCreateNewsText" BasePath="/ckeditor/" runat="server"></CKEditor:CKEditorControl>
                                </div>
                                <div class="inputFormEditorValidation floatRight">
                                    <asp:RequiredFieldValidator ID="rfvalText" runat="server" ErrorMessage="Text is required" ToolTip="Text is required" Text="*" ControlToValidate="ckeditorCreateNewsText" ValidationGroup="AdminCreateNews" ForeColor="Red"></asp:RequiredFieldValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <asp:Label ID="lblLocalized" runat="server" Text="Engelsk nyhed" CssClass="contentTitle"></asp:Label>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblCreateNewsLocalizedTitle" runat="server" Text="Engelsk Titel:"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatRight">
                                    <asp:TextBox ID="txtCreateNewsLocalizedTitle" runat="server" Width="300px"></asp:TextBox>
                                    <asp:RequiredFieldValidator ID="rfvalCreateNewsLocalizedTitle" runat="server" ErrorMessage="English Title is required" ToolTip="English Title is required" Text="*" ControlToValidate="txtCreateNewsLocalizedTitle" ValidationGroup="AdminCreateNews" ForeColor="Red"></asp:RequiredFieldValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="floatLeft">
                                    <asp:Label ID="lblCreateNewsLocalizedText" runat="server" Text="Engelsk Tekst:"></asp:Label>
                                    <br />
                                    <br />
                                    <CKEditor:CKEditorControl ID="ckeditorCreateNewsLocalizedText" BasePath="/ckeditor/" runat="server"></CKEditor:CKEditorControl>
                                </div>
                                <div class="inputFormEditorValidation floatRight">
                                    <asp:RequiredFieldValidator ID="rfvalCreateNewsLocalizedText" runat="server" ErrorMessage="English Text is required" ToolTip="English Text is required" Text="*" ControlToValidate="ckeditorCreateNewsLocalizedText" ValidationGroup="AdminCreateNews" ForeColor="Red"></asp:RequiredFieldValidator>
                                </div>
                            </div>

                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormSmallCellLeft floatLeft">
                                    <asp:Label ID="lblCreateNewsImage" runat="server" Text="Billede:"></asp:Label>
                                </div>
                                <div class="inputFormSmallCellRight floatRight">
                                    <asp:FileUpload ID="fuCreateNewsImage" runat="server" />
                                    <br />
                                    <asp:RegularExpressionValidator ID="regexvalNewsImage" runat="server" ForeColor="Red" ControlToValidate="fuCreateNewsImage" ValidationGroup="AdminCreateNews" ErrorMessage="Filen du prøver at uploade er ikke tilladt" ValidationExpression=".*(\.[Jj][Pp][Gg]|\.[Gg][Ii][Ff]|\.[Jj][Pp][Ee][Gg]|\.[Pp][Nn][Gg])"></asp:RegularExpressionValidator>
                                </div>
                            </div>                             
                            

                            <div class="inputFormSmallRow floatLeft">
                                <div class="inputFormButtonMargin floatRight">
                                    <asp:Button ID="btnAdminCreateNews" runat="server" Text="Opret Nyhed" ValidationGroup="AdminCreateNews" CssClass="button" OnClick="btnAdminCreateNews_Click" />
                                </div>
                            </div>
                        </div>
                        <div class="inputFormSmallRight floatRight">
                            <asp:ValidationSummary ID="valSumAdminCreateNews" ValidationGroup="AdminCreateNews" runat="server" HeaderText="Følgende fejl blev fundet:" ForeColor="Red" />
                        </div>
                    </asp:Panel>

                    <asp:Label ID="lblAdminCreateNewsSucces" runat="server" Text="Nyheden er nu oprettet"></asp:Label>
                </div>
            </div>
        </div>
    </div>
</asp:Content>
